﻿using EmailClient.Mail;
using LumiSoft.Net.IMAP.Client;
using ServiceStack.DataAnnotations;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

namespace EmailClient.Model
{
    public class EmailAccount
    {
        [PrimaryKey, AutoIncrement]
        public int Id { get; set; }

        [Required]
        [CustomField("CHAR(50)")]
        public string Name { get; set; }

        [CustomField("CHAR(150)")]
        public string FullName { get; set; }

        [CustomField("CHAR(500)")]
        public string Signature { get; set; }

        [Required]
        [CustomField("CHAR(4)")]
        public string MailType { get; set; }

        [Required]
        [CustomField("CHAR(100)")]
        public string inServer { get; set; }
        
        [CustomField("CHAR(100)")]
        public string outServer { get; set; }

        [Required]
        [CustomField("INTEGER")]
        public int inPort { get; set; }
       
        [CustomField("INTEGER")]
        public int outPort { get; set; }

        [Required]
        [CustomField("CHAR(50)")]
        public string UserName { get; set; }

        [CustomField("CHAR(50)")]
        public string Password { get; set; }

        [Required]
        [CustomField("CHAR(100)")]
        public string Email { get; set; }

        public bool GetLetterFromServer { get; set; }

        public bool UseSSL { get; set; }

        [Reference]
        public List<MailFolder> MailFolders { get; set; }

        public bool UseSameUserPassSending { get; set; }
        
    }
}
